package com.fs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.pojo.SysAdmin;
import com.fs.vo.SysResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 管理员表
 */
@Mapper
public interface SysAdminMapper extends BaseMapper<SysAdmin> {

    List<String> getAdminMenu(Long userId);

    @Select("select * from sys_admin where username=#{username}")
    SysAdmin findByUsername(String username);

    @Select("select * from sys_admin where id=#{userId}")
    SysAdmin findByUserId(Integer userId);

    SysAdmin selectByIdAndRole(Integer id);
}
